package com.alon.spring01.common.config.redis;

import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * @program: spring01
 * @description: redis 初始化
 * @author: yulongguang
 * @create: 2019-04-25 22:35
 **/
@Component
public class RedisUtilInit {

    @Autowired
    private RedisTemplate<String, Object> redisTemplate;

    @PostConstruct
    public void postConstruct() {
        RedisUtil.init(redisTemplate);
    }

}
